projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9b7297
)
* src/xsmfns.c (x_session_initialize): Fix memory leak.
author
Paul Eggert
<eggert@cs.ucla.edu>
Sun, 8 Oct 2017 05:48:49 +0000
(22:48 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sun, 8 Oct 2017 05:57:11 +0000
(22:57 -0700)
src/xsmfns.c
patch
|
blob
|
history
diff --git
a/src/xsmfns.c
b/src/xsmfns.c
index 2cb4f3eca56680ddeed60c3f749a17ae3073c03c..fb0d01bb66cfe29bd81275d60ac69778a014de5c 100644
(file)
--- a/
src/xsmfns.c
+++ b/
src/xsmfns.c
@@
-401,12
+401,14
@@
x_session_initialize (struct x_display_info *dpyinfo)
ptrdiff_t name_len = 0;
/* libSM seems to crash if pwd is missing - see bug#18851. */
- if (! emacs_get_current_dir_name ())
+ char *pwd = emacs_get_current_dir_name ();
+ if (!pwd)
{
fprintf (stderr, "Disabling session management due to pwd error: %s\n",
emacs_strerror (errno));
return;
}
+ xfree (pwd);
ice_fd = -1;
doing_interact = false;